extends "../i_bangled13_Hide/i_bangled13_Hide.gd"

func init():
	.init()
	name = "毒手镯·疗"
	resetdata()
	info = "毒素掌控：[主动]将自己和自己十字范围内的队友身上所有<毒种>转换为对携带者的治疗，每有一层，回复30%物攻生命值[cd:7秒][被动]所有攻击10%使得敌方身上的<毒种>层数翻倍\n" + info

func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"fb")
	
func _upS():
	._upS()
	cnt2 += 1
	if cnt2 == 7:
		cnt2 = 0
		hbzk()

func hbzk():
	var chas = masCha.getCellChas(masCha.cell,1,2)
	for i in chas:
		var bf = i.hasBuff("b_duzhong")
		if bf:
			var healval = bf.cnt * masCha.att.atk * 0.3
			bf.isDel = true
			masCha.healCha(i,healval)

func fb(atkinfo):
	if atkinfo.isMiss || atkinfo.atkType == Chara.AtkType.EFF:return
	if sys.rndPer(10):
		var bf = atkinfo.hitCha.hasBuff("b_duzhong")
		if bf:
			bf.cnt *= 2
			if bf.cnt >= 9:
				bf.isDel = true
				masCha.hurtChara(atkinfo.hitCha,masCha.att.atk * 1.5,Chara.HurtType.REAL,Chara.AtkType.EFF)